using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace CLZ.Data
{
	public static class TableShopHoursConfig
	{
		public const string Table = "ShopHoursConfig";
		public const string ShopHoursConfigID = "ShopHoursConfigID";
		public const string ConfigName = "ConfigName";
		public const string Title = "Title";
		public const string Content = "Content";
		public const string ShopHours = "ShopHours";
		public const string Creater = "Creater";
		public const string CreatedBy = "CreatedBy";
		public const string Created = "Created";
		public const string Modified = "Modified";
		public const string ModifiedBy = "ModifiedBy";
		public const string ModifiedByID = "ModifiedByID";
	}
	
	[Serializable]
	public class BaseShopHoursConfig
		: IDbSessionEntity, IJsonClass
	{
		int m_ShopHoursConfigID;
		/// <summary>
        /// 
        /// </summary>
        public int ShopHoursConfigID
        {
            get { return m_ShopHoursConfigID; }
            set { m_ShopHoursConfigID = value; }
        }
		
		string m_ConfigName;
		/// <summary>
        /// 
        /// </summary>
        public string ConfigName
        {
            get { return m_ConfigName; }
            set { m_ConfigName = value; }
        }
		
		string m_Title;
		/// <summary>
        /// 
        /// </summary>
        public string Title
        {
            get { return m_Title; }
            set { m_Title = value; }
        }
		
		string m_Content;
		/// <summary>
        /// 
        /// </summary>
        public string Content
        {
            get { return m_Content; }
            set { m_Content = value; }
        }
		
		DateTime m_ShopHours;
		/// <summary>
        /// 
        /// </summary>
        public DateTime ShopHours
        {
            get { return m_ShopHours; }
            set { m_ShopHours = value; }
        }
		
		int m_Creater;
		/// <summary>
        /// 
        /// </summary>
        public int Creater
        {
            get { return m_Creater; }
            set { m_Creater = value; }
        }
		
		string m_CreatedBy;
		/// <summary>
        /// 
        /// </summary>
        public string CreatedBy
        {
            get { return m_CreatedBy; }
            set { m_CreatedBy = value; }
        }
		
		DateTime m_Created;
		/// <summary>
        /// 
        /// </summary>
        public DateTime Created
        {
            get { return m_Created; }
            set { m_Created = value; }
        }
		
		DateTime m_Modified;
		/// <summary>
        /// 
        /// </summary>
        public DateTime Modified
        {
            get { return m_Modified; }
            set { m_Modified = value; }
        }
		
		string m_ModifiedBy;
		/// <summary>
        /// 
        /// </summary>
        public string ModifiedBy
        {
            get { return m_ModifiedBy; }
            set { m_ModifiedBy = value; }
        }
		
		int? m_ModifiedByID;
		/// <summary>
        /// 
        /// </summary>
        public int? ModifiedByID
        {
            get { return m_ModifiedByID; }
            set { m_ModifiedByID = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_ShopHoursConfigID = reader[TableShopHoursConfig.ShopHoursConfigID];
            m_ConfigName = reader[TableShopHoursConfig.ConfigName];
            m_Title = reader[TableShopHoursConfig.Title];
            m_Content = reader[TableShopHoursConfig.Content];
            m_ShopHours = reader[TableShopHoursConfig.ShopHours];
            m_Creater = reader[TableShopHoursConfig.Creater];
            m_CreatedBy = reader[TableShopHoursConfig.CreatedBy];
            m_Created = reader[TableShopHoursConfig.Created];
            m_Modified = reader[TableShopHoursConfig.Modified];
            m_ModifiedBy = reader[TableShopHoursConfig.ModifiedBy];
            m_ModifiedByID = reader[TableShopHoursConfig.ModifiedByID];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
            writer.SetPrimaryKey(TableShopHoursConfig.ShopHoursConfigID, PrimaryKeyType.Identity, ShopHoursConfigID);
			writer[TableShopHoursConfig.ConfigName] = ConfigName;
			writer[TableShopHoursConfig.Title] = Title;
			writer[TableShopHoursConfig.Content] = Content;
			writer[TableShopHoursConfig.ShopHours] = ShopHours;
			writer[TableShopHoursConfig.Creater] = Creater;
			writer[TableShopHoursConfig.CreatedBy] = CreatedBy;
			writer[TableShopHoursConfig.Created] = Created;
			writer[TableShopHoursConfig.Modified] = Modified;
			writer[TableShopHoursConfig.ModifiedBy] = ModifiedBy;
			writer[TableShopHoursConfig.ModifiedByID] = ModifiedByID;
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
            m_ShopHoursConfigID = idd;
        }
		
		public string TableName
        {
            get { return TableShopHoursConfig.Table; }
        }
		#endregion
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_ShopHoursConfigID = hashToRead["ShopHoursConfigID"];
			 
             m_ConfigName = hashToRead["ConfigName"];
			 
             m_Title = hashToRead["Title"];
			 
             m_Content = hashToRead["Content"];
			 
             m_ShopHours = hashToRead["ShopHours"];
			 
             m_Creater = hashToRead["Creater"];
			 
             m_CreatedBy = hashToRead["CreatedBy"];
			 
             m_Created = hashToRead["Created"];
			 
             m_Modified = hashToRead["Modified"];
			 
             m_ModifiedBy = hashToRead["ModifiedBy"];
			 
             m_ModifiedByID = hashToRead["ModifiedByID"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["ShopHoursConfigID"] = ShopHoursConfigID;
			 
            hashToFill["ConfigName"] = ConfigName;
			 
            hashToFill["Title"] = Title;
			 
            hashToFill["Content"] = Content;
			 
            hashToFill["ShopHours"] = ShopHours;
			 
            hashToFill["Creater"] = Creater;
			 
            hashToFill["CreatedBy"] = CreatedBy;
			 
            hashToFill["Created"] = Created;
			 
            hashToFill["Modified"] = Modified;
			 
            hashToFill["ModifiedBy"] = ModifiedBy;
			 
            hashToFill["ModifiedByID"] = ModifiedByID;
			 
        }

        #endregion
		
	}
}
